package com.dianshan.controller;

import com.dianshan.entity.User;
import com.dianshan.service.IUserService;
import com.domain.PageQuery;
import com.domain.PageResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author xiaolong
 * @since 2024-06-18
 */
@RestController
@RequestMapping("/user")
@Api(tags = "用户信息管理系统")
@Slf4j
public class UserController {

    @Autowired
    IUserService userService;


    @PostMapping("/list")
    @ApiOperation("用户分页查询")
    public PageResult<User> list(@RequestBody PageQuery pageQuery){

        PageResult<User> result = userService.listOne(pageQuery);

        return result;

    }



}
